

{{ await Mode("TPL").Render("@"+KUO.CLASS+"/"+TPLtemp+"/head",KUO,THIS) }}
<div class="kuoneir" style="position: relative;">
    <div class="layui-hide-xs" style="height:200px;background-size:100%;width: 100%;height: 410px;"></div>
        <div class="kuoneir2">
            <div class="layui-container">
                <div class="neirong">
                    <div class="layui-row layui-col-space10"> 
                        
               
                  
                        <h1>{{ KUO.$DATA }}</h1>
                        
                    </div>
                </div>

                <div style="height:20px;"></div>
            </div>   
        </div>
    </div>
</div>
{{ await Mode("TPL").Render("@"+KUO.CLASS+"/"+TPLtemp+"/foot",KUO,THIS) }}
<script>
var ID = "{{KUO.$DATA['id']}}";
var shouqi = false;
function shoucang(){

    if(UID < 1 ){

        login(shoucang);
        return ;
    }


    apptongxin("chapter/collect",{id:ID},function(data){
        if(data.code == 1){
            if(typeof(data.data.collect) != "undefined"){
                if(data.data.collect == 1){
                    $("#shoucangx").html('<i class="layui-icon layui-icon-star-fill" ></i> 收藏'); 
                }else{
                    $("#shoucangx").html('<i class="layui-icon layui-icon-star" ></i> 收藏'); 
                }
            }
        }
    });
}


function shouqilai(){
  if(shouqi){
    shouqi = false;
    $(".chapter").css({"max-height":"288px"});
    $("#ttttt").html('查看所有章节 <i class="layui-icon layui-icon-down "></i>');
 
    console.log("shoulai");
  }else{
    shouqi = true;
    $(".chapter").css({"max-height":"none"});
    $("#ttttt").html('收起  <i class="layui-icon layui-icon-up"></i>');
   
  }
}
var PAIXU = true;
$(function(){
  
  layui.flow.lazyimg(); 
 
     layui.rate.render({
      length:5,
      value:'{{KUO.$DATA.recommend}}',
      half:false,
      readonly:true,
      elem: '#test1' 
    });
    $("#gopaixu").click(function(){
        if(PAIXU){
            PAIXU = false;
        }else{
            PAIXU = true;
        }
        var mylist = $('.list-box');                 
        var listitems = mylist.children('li').get();
        listitems.reverse();
        $.each(listitems, function(idx, itm) { mylist.append(itm); });
        if(PAIXU){
            $("#gopaixu").html('<i class="layui-icon layui-icon-down "></i>正序');
        }else{ $("#gopaixu").html('<i class="layui-icon layui-icon-up "></i>倒序');
           

        }


    });
    apptongxin("cms/json/datarenqi",{id:ID},function(data){
        if(data.code == 1){
            $("#popularity").html(data.data);
        }
    });
    /* {{# if(KUO.$DATA.int1 == 3){ }} */
    apptongxin("chapter/getcollect",{id:ID},function(data){
        
        if(data.code == 1 && data.data){

            if(data.data.uid > 0){
                UID = data.data.uid ;
            }
    
            if( data.data.collect == 1){
                $("#shoucangx").html('<i class="layui-icon layui-icon-star-fill" ></i> 收藏'); 
            }
            if( data.data.chapterid > 0){
                $("#goyuedu").attr({href:'{{ KuoLink([ KUO.CLASS, KUO.$DATA["url"] ],2)  }}'+data.data.chapterid+'{{WebExt}}' });
                $("#goyuedu").html('<i class="layui-icon layui-icon-read"></i> 继续阅读');
                $(".chapter_item").removeClass("hover");
                $(".chapterid"+data.data.chapterid).addClass("hover");
            }
        }
    });
 
    /* {{# } }} */
});
</script>